package com.wyzz.hr.exportfile;

import java.util.Collections;
import java.util.List;

import com.wyzz.hr.pojo.Empsalarypay;
import com.wyzz.hr.util.comparator.ObjectFieldComparator;

public class SalaryRecordSorter {

	public SalaryRecordSorter(List records) {
		this.records = records;
	}

	public void doSort(String sortProperties[]) {
		ObjectFieldComparator com = new ObjectFieldComparator();
		try {
			com.initial(Empsalarypay.class, sortProperties, new int[0]);
		} catch (Exception e) {
			e.printStackTrace();
		}
		Collections.sort(records, com);
	}

	private List records;
}
